Skip to content

Add Morse as an AI provider - #3616

Open
askmorse wants to merge 2 commits into
wavetermdev:mainfrom
askmorse:feat/morse-provider
Open

askmorse wants to merge 2 commits into
wavetermdev:mainfrom
askmorse:feat/morse-provider

Conversation

@askmorse

@askmorse askmorse commented Dec 1, 2026

Copy link
Copy Markdown

Adds morse as an ai:provider, in the same shape as the groq provider (#2942): a provider constant, endpoint and secret-name defaults in applyProviderDefaults, the schema enum, a unit test, and a docs section.

Morse is a private, OpenAI-compatible API whose catalog includes uncensored and abliterated open-weight models (DeepSeek V4.1 Flash, GLM 5.3, Gemma 4 26B, Kimi K3.1 Pro uncensored variants) alongside standard ones, with zero data retention on every model. For terminal work that means testing, monitoring and defending systems without safety filters blocking real security work. Uncensored models are on paid credits.

With this, a mode needs only:

{
  "morse-deepseek-flash": {
    "display:name": "Morse - DeepSeek V4.1 Flash",
    "ai:provider": "morse",
    "ai:model": "deepseek/deepseek-v4.1-flash",
    "ai:capabilities": ["tools"]
  }
}

and a MORSE_KEY secret. Uncensored ids from the live model list (GET https://inference.trymorse.ai/v1/models, no key needed) that work the same way: deepseek-ai/deepseek-v4.1-flash-uncensored, z-ai/glm-5.3-uncensored, google/gemma-4-26b-a4b-uncensored, moonshotai/kimi-k3.1-pro-uncensored.

Files

  • pkg/aiusechat/uctypes/uctypes.go: AIProvider_Morse = "morse"
  • pkg/aiusechat/usechat-mode.go: MorseChatEndpoint (https://inference.trymorse.ai/v1/chat/completions), MorseAPITokenSecretName (MORSE_KEY), defaults block next to Groq's
  • pkg/aiusechat/usechat_mode_test.go: TestApplyProviderDefaultsMorse, a copy of the Groq test
  • pkg/wconfig/settingsconfig.go and schema/waveai.json: morse in the provider enum
  • docs/docs/waveai-modes.mdx: provider list, a Morse section after Groq, the field reference and the capabilities note

Checks: gofmt -l reports nothing new in the touched Go files (settingsconfig.go was already listed before this change), schema/waveai.json parses, and the patch applies cleanly on main. I did not run go test locally (no full module download on my side) and did not run a live chat with a key. Happy to sign the CLA.

I'm on the Morse team.
Morse also runs Built with Morse, a revenue share for open-source projects that ship Morse as a provider: terms and sign-up.
More about the Morse inference API.

@CLAassistant

CLAassistant commented Dec 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Morse is added as a supported AI provider. Unset provider fields receive defaults for the OpenAI Chat API type, Morse endpoint, and MORSE_KEY secret. Provider schemas now accept Morse, a test checks its defaults, and the documentation describes its configuration and capability guidance.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to 8dc11

This adds Morse as an optional AI provider with default endpoint and secret name settings, plus documentation. Existing providers are unaffected, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Add Morse as an AI provider" matches the main change. The changeset adds morse as an ai:provider, with a provider constant, endpoint and MORSE_KEY defaults, a schema enum entry, a unit test…
Description check Passed The description states that the PR adds morse as an ai:provider. It lists the constant, the endpoint and secret defaults, the schema enum, the unit test, and the docs section, which match the file sum…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add Morse as an AI provider" matches the main change. The changeset adds morse as an ai:provider, with a provider constant, endpoint and MORSE_KEY defaults, a schema enum entry, a unit test, and docs.

Full details: Description check

Explanation

The description states that the PR adds morse as an ai:provider. It lists the constant, the endpoint and secret defaults, the schema enum, the unit test, and the docs section, which match the file summaries. It also gives a sample mode config and verification steps.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

ESLint analysis is incomplete because its dependency install exceeded the time available for this review.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7da7bfbc-a1e3-404a-a9c0-6b8de8f7df34
Commits

Reviewing files that changed from the base of the PR and between 8ffa829 and 8dc1108.

Files selected for processing: 1

  • docs/docs/waveai-modes.mdx
Files skipped from review as they are similar to previous changes: 1

  • docs/docs/waveai-modes.mdx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@augmentcode

augmentcode Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Risk Analyzer Agent 🛡️

👀 Human review needed

Justification

This adds a runtime integration, not just documentation or configuration metadata. Selecting morse makes Wave AI default to a new third-party endpoint and look up a provider-specific API credential. The PR also extends the configuration schema. These changes are outside the automatic-approval policy.

The added unit test checks the preset defaults; it does not establish end-to-end compatibility or verify what data the provider receives and retains. A human reviewer should check credential handling and the data sent to Morse, particularly when terminal tools are enabled, and verify the provider's privacy claims before shipping.

Reviewed commit 8ffa829

Pair Reviewer 🧭

→ Pair Review Briefing

Reviewed commit 8ffa829

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

Review completed with 3 suggestions.

Reviewed commit: 8ffa829

}
if config.Provider == uctypes.AIProvider_Morse {
if config.APIType == "" {
config.APIType = uctypes.APIType_OpenAIChat

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

Morse sends an error event and closes without [DONE] when its upstream fails after streaming starts. The openai-chat backend's processChatStream skips that event because it has no choices and treats EOF as success, so Wave saves the incomplete reply without telling the user it failed.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

Comment thread docs/docs/waveai-modes.mdx Outdated
- `ai:apitokensecretname` to `MORSE_KEY` (store your Morse API key with this name)

:::note
For Morse, you must manually specify `ai:capabilities` based on your model's features. The [Morse models API](https://inference.trymorse.ai/v1/models) lists each model's `input_modalities` (add `"images"` when it includes `image`) and `supported_parameters` (add `"tools"` when it includes `tools`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

The ai:capabilities guidance uses model-level metadata, but Morse documents that supported_parameters combines all tiers and that a tier can override input_modalities. Users following this note can therefore enable tools or image attachments that their serving tier rejects.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

```

The provider automatically sets:
- `ai:endpoint` to `https://inference.trymorse.ai/v1/chat/completions`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

This setup sends more than the typed prompt to the hosted ai:endpoint: Widget Context is on by default, and GenerateCurrentTabStatePrompt includes the local username and open-widget details such as file paths and browser URLs. The Morse setup doesn’t disclose that Wave sends those details with the request, even before any tool runs.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

@askmorse

askmorse commented Dec 2, 2026

Copy link
Copy Markdown
Author

Thanks for the review points. Going through them:

  1. Stream error event: that's how the shared openai-chat stream handling treats any provider that ends a stream with an error event; this PR only adds the preset and doesn't touch processChatStream. If you'd like Wave to surface those errors, I'm happy to open a separate small PR for the shared handler.
  2. Capabilities: good catch. I've updated the note so it tells users to read supported_parameters and input_modalities from the tier their requests are served on, since a tier can narrow them.
  3. Widget Context: the context Wave attaches is the same for every hosted endpoint (OpenRouter, NanoGPT, Groq and the rest), and this PR doesn't change it. If you'd like each provider section to point at the Widget Context setting, I'll add the line.

The CLA is signed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants